<%@ page contentType="text/html; charset=iso-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/principal_path_correct.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>SisHoras - Gerenciamento de Horas/Aula e Reservas</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<c:set var="agora" value="<%=new java.util.Date()%>" />
<!-- InstanceEndEditable -->
<link href="/SisHoras/css/estilo.css" rel="stylesheet" type="text/css" />
<link href="/SisHoras/css/formulario.css" rel="stylesheet" type="text/css" />
<link href="/SisHoras/css/displaytag.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
	<div id="cabecalho">
		<div id="espaco_logo_sistema"><img src="/SisHoras/imagens/sishoras.png" width="135" height="38" /></div>
	  <div id="espaco_logo2"><img src="/SisHoras/imagens/logo_netcom_N_menor.png"/></div>
	</div>
	<div id="menu">
	<jsp:include page="/includes/menu.jsp" flush="true" />    
	</div>
	<!-- InstanceBeginEditable name="Conteudo" -->
	<div id="conteudo">
      <div id="titulo_conteudo"> :: Reservas
        &nbsp;&nbsp;<a href="reserva.form.logic"><img src="/SisHoras/imagens/icones/mais.gif"/></a> </div>
	  <div id="formulario"> 
	  <ul id="erros">
		<c:forEach var="error" items="${errors.iterator}">
			<li>${error.key}</li>
		</c:forEach>
	  </ul>
		  <form action="reserva.armazena.logic">
			<fieldset>
			<legend>Cadastro de Reservas</legend>
				
				<label for="reserva.curso.id">Curso:</label>
				<select name="reserva.curso.id">
					<c:forEach var="curso" items="${listaCursos}">
						<option value="${curso.id}" 
							<c:if test="${reserva.curso.id == curso.id}">
								selected="true"
							</c:if>
						>${curso.nome}</option>
					</c:forEach>
				</select>
				<br/>
				<label for="reserva.nome">Nome:</label>
				<input type="text" name="reserva.nome" size="45" value='${reserva.nome}'/>
				<br/>
				
				<label for="reserva.telefone">Telefone:</label>
				<input type="text" name="reserva.telefone" size="12" value="${reserva.telefone}"/>
				<br/>
				
				<label for="reserva.celular">Celular:</label>
				<input type="text" name="reserva.celular" size="12" value="${reserva.celular}"/>
				<br/>
				
				<label for="reserva.endereco">Endereco:</label>
				<input type="text" name="reserva.endereco" size="45" value="${reserva.endereco}"/>
				<br/>
				
				<label for="reserva.observacoes">Observacoes:</label>
					<input type="text" name="reserva.observacoes" size="45" value="${reserva.observacoes}"/>
				<br/>
		
				<c:if test="${reserva != null}">
					<input type="hidden" name="reserva.id" value="${reserva.id}"/>
					<input type="hidden" name="reserva.dataCadastro" value='<fmt:formatDate dateStyle="short" value="${reserva.dataCadastro}"/>'/>
	            </c:if>
	            <c:if test="${reserva == null}">
					<input type="hidden" name="reserva.dataCadastro" value='<fmt:formatDate dateStyle="short" value="${agora}"/>'/>
	            </c:if>
	            
	            <input type="submit" name="salvar" id="salvar" value="Salvar" />
							
			</fieldset>		
		  </form>
	  </div>
 
    </div>
	<!-- InstanceEndEditable -->
	<div id="rodape">SisHoras 2009<br />
	1024 X 768</div>
</div>
</body>
<!-- InstanceEnd --></html>
